/**
 * 
 */
package it.unical.canonaco.rende.igpe.game.cbv.guilayer.sprites;

/**
 * @author Massimo Canonaco
 *
 */
public class Sprite 
{
	private String frameName;
	
	private int topX;
	
	private int topY;
	
	private int width;
	
	private int height;
	
	private Sprite next;

	/**
	 * @return the frameName
	 */
	public String getFrameName() {
		return frameName;
	}

	/**
	 * @param frameName the frameName to set
	 */
	public void setFrameName(String frameName) {
		this.frameName = frameName;
	}

	/**
	 * @return the topX
	 */
	public int getTopX() {
		return topX;
	}

	/**
	 * @param topX the topX to set
	 */
	public void setTopX(int topX) {
		this.topX = topX;
	}

	/**
	 * @return the topY
	 */
	public int getTopY() {
		return topY;
	}

	/**
	 * @param topY the topY to set
	 */
	public void setTopY(int topY) {
		this.topY = topY;
	}

	/**
	 * @return the width
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * @param width the width to set
	 */
	public void setWidth(int width) {
		this.width = width;
	}

	/**
	 * @return the height
	 */
	public int getHeight() {
		return height;
	}

	/**
	 * @param height the height to set
	 */
	public void setHeight(int height) {
		this.height = height;
	}

	/**
	 * @return the next
	 */
	public Sprite getNext() {
		return next;
	}

	/**
	 * @param next the next to set
	 */
	public void setNext(Sprite next) {
		this.next = next;
	}
	
	@Override
	public String toString() {
//		Sprite ss = (Sprite)sa;
		String s = null;
		if(next == null)
			s = new String("no next");
		else
			s = String.valueOf(next.getFrameName());
		return "Nome frame : "+frameName+"\n"+
				"Topx : "+getTopX()+"\n"+
				"Topy : "+topY+"\n"+
				"Next : "+s+"\n"+
				"Width : "+width+"\n"+
				"Height : "+height;
				
	}
}
